/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 2013-2014 sagyf Yang. The Four Group.
 */

package app.models.booking;

import com.github.sog.annotation.TableBind;
import com.github.sog.libs.AppFunc;
import com.github.sog.plugin.sqlinxml.SqlKit;
import com.jfinal.plugin.activerecord.Model;
import org.joda.time.DateTime;

/**
 * <p>
 * KTV每日预定.
 * </p>
 *
 * @author sagyf yang
 * @version 1.0 2014-05-28 16:21
 * @since JDK 1.6
 */
@TableBind(tableName = "ol_booking_ktv_stat")
public class KtvStat extends Model<KtvStat> {
    public static final KtvStat dao = new KtvStat();

    private static final long serialVersionUID = 5912120238916720727L;


    public KtvStat findByDay(DateTime day) {

        return findFirst(SqlKit.sql("ktv.dailystat"), day.toString(AppFunc.DATE_TIME_PATTERN_YYYY_MM_DD));
    }
}
